#ifndef FILE_se_Sprite_HPP
#define FILE_se_Sprite_HPP

#include <vector>
#include <SFML/Graphics.hpp>


namespace se{
namespace Graphics{

/********************************************//**
 * \brief Virtual class given to the DrawingInstance.
 *
 * Inherits of the sf:Sprite, so you can use all the sprite
 * transformations.
 ***********************************************/
class Sprite: public sf::Sprite{
	public :
		Sprite() : m_layer(0){ }
		/********************************************//**
		* \brief Update the sprite, ie gets it the right image.
		*
		* Called just before rendering it.
		* Ideally, this function would not have been necessary, but the Draw
		* of the \c sf::Sprite is private, and therefore...
		***********************************************/
		virtual void Update() = 0;

		/********************************************//**
		* Set the layer of the sprite.
		*
		* This is not in theory needed, because the \c m_layer
		* is \c protected , and can be accessed by any inheriting class.
		* Maybe to remove. Or to leave, for ease of access.
		* \param layer The new layer.
		***********************************************/
		void SetLayer( uint16_t layer ){m_layer = layer;}

		/********************************************//**
		* Returns the layer the sprite is on.
		* \return The current layer.
		***********************************************/
		uint16_t GetLayer(){return m_layer;}

		virtual ~Sprite(){};

	protected :
      /********************************************//**
       * The layer the sprite is on.
       * 
       * The idea of layer is self explanatory, the layer 0 is
       * the "non displayed", because of the background at layer 1,
       * and for the other layers, the bigger it is, the latest it
       * is drawn, and therefore the more "to the front" it is.
       *
       * You should ideally not programatically define the layer
       * the items are on, or at least not without a range, because
       * an \c unit16_t isn't too hard to overflow.
	   *
	   * \todo Think about the possible ordering problems
	   * between frames (blinking of superposed sprites).
       ***********************************************/
		uint16_t m_layer;
};//</class Sprite>

}//</namespace Graphics>
}//</namespace se>

#endif
